function c = cost( cities, Costs )

n = length(cities);
c = 0;
for i = 1:n
    if i == n 
       c = c + Costs(cities(i),cities(1));
    else
       c = c + Costs(cities(i),cities(i+1)); 
    end
    
end

